import { createApp } from 'vue'
import App from '@/App.vue'

// reset css
import 'normalize.css'

// 引入Element
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//
import router from '@/router';
//
import { setupStore } from '@/store/index'
import { setupDirectives, setupGlobalMethods, setupCustomComponents } from '@/plugins'


const app = createApp(App)

app
  .use(ElementPlus)
  .use(router)

// 挂载vuex状态管理
setupStore(app)
// 注册全局自定义组件,如：<svg-icon />
setupCustomComponents(app)
// 注册全局自定义指令，如：v-permission权限指令
setupDirectives(app)
// 注册全局方法，如：app.config.globalProperties.$message = message
setupGlobalMethods(app)

app.mount('#app')
